home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Disks.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  3.2 KB  |  105 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Disks.a
  3. ;
  4. ;    Contains:    Disk Driver Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1985-1991,1993, 1995-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DISKS__') = 'UNDEFINED' THEN
  19. __DISKS__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  25.     include 'OSUtils.a'
  26.     ENDIF
  27.  
  28.  
  29. sony                            EQU        0
  30. hard20                            EQU        1
  31. ;    Note:
  32. ;    
  33. ;    qLink is usually the first field in queues, but back in the MacPlus
  34. ;    days, the DrvSts record needed to be expanded.  In order to do this without
  35. ;    breaking disk drivers that already added stuff to the end, the fields 
  36. ;    where added to the beginning.  This was originally done in assembly language
  37. ;    and the record was defined to start at a negative offset, so that the qLink
  38. ;    field would end up at offset zero.  When the C and pascal interfaces where
  39. ;    made, they could not support negative record offsets, so qLink was no longer
  40. ;    the first field.  Universal Interfaces are auto generated and don't support
  41. ;    negative offsets for any language, so DrvSts in Disks.a has qLinks at a 
  42. ;    none zero offset.  Assembly code which switches to Universal Interfaces will
  43. ;    need to compensate for that.
  44. ;
  45. ;
  46.  
  47.  
  48. DrvSts                    RECORD 0
  49. track                     ds.w    1                ; offset: $0 (0)        ;  current track 
  50. writeProt                 ds.b    1                ; offset: $2 (2)        ;  bit 7 = 1 if volume is locked 
  51. diskInPlace                 ds.b    1                ; offset: $3 (3)        ;  disk in drive 
  52. installed                 ds.b    1                ; offset: $4 (4)        ;  drive installed 
  53. sides                     ds.b    1                ; offset: $5 (5)        ;  -1 for 2-sided, 0 for 1-sided 
  54. qLink                     ds.l    1                ; offset: $6 (6)        ;  next queue entry 
  55. qType                     ds.w    1                ; offset: $A (10)        ;  1 for HD20 
  56. dQDrive                     ds.w    1                ; offset: $C (12)        ;  drive number 
  57. dQRefNum                 ds.w    1                ; offset: $E (14)        ;  driver reference number 
  58. dQFSID                     ds.w    1                ; offset: $10 (16)        ;  file system ID 
  59. twoSideFmt                 ds.b    1                ; offset: $12 (18)        ;  after 1st rd/wrt: 0=1 side, -1=2 side 
  60. needsFlush                 ds.b    1                ; offset: $13 (19)        ;  -1 for MacPlus drive 
  61. diskErrs                 ds.w    1                ; offset: $14 (20)        ;  soft error count 
  62.                          ORG 18
  63. driveSize                 ds.w    1                ; offset: $12 (18)
  64. driveS1                     ds.w    1                ; offset: $14 (20)
  65. driveType                 ds.w    1                ; offset: $16 (22)
  66. driveManf                 ds.w    1                ; offset: $18 (24)
  67. driveChar                 ds.w    1                ; offset: $1A (26)
  68. driveMisc                 ds.b    1                ; offset: $1C (28)
  69.                          ORG 30
  70. sizeof                     EQU *                    ; size:   $1E (30)
  71.                         ENDR
  72. DrvSts2                    RECORD 0
  73. f                         ds        DrvSts
  74. sizeof                     EQU *                    ; size:   $1E (30)
  75.                         ENDR
  76.  
  77.  
  78.  
  79. kdqManualEjectBit                EQU        5
  80. ;
  81. ; pascal OSErr DiskEject(short drvNum)
  82. ;
  83.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  84.         IMPORT_CFM_FUNCTION DiskEject
  85.     ENDIF
  86.  
  87. ;
  88. ; pascal OSErr SetTagBuffer(void *buffPtr)
  89. ;
  90.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  91.         IMPORT_CFM_FUNCTION SetTagBuffer
  92.     ENDIF
  93.  
  94. ;
  95. ; pascal OSErr DriveStatus(short drvNum, DrvSts *status)
  96. ;
  97.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  98.         IMPORT_CFM_FUNCTION DriveStatus
  99.     ENDIF
  100.  
  101.  
  102.     ENDIF ; __DISKS__ 
  103.  
  104.